package com.summer.weekGame74;

public class test1 {
    public boolean divideArray(int[] nums) {
        int count = 0;
        for (int i = 0; i < nums.length; i++) {
            for (int j=nums.length-1;j>i;j--){
                if (nums[i]==nums[j]&&nums[i]!=-1){
                    count++;
                    nums[i]=-1;
                    nums[j]=-1;
                }
            }
        }
        if (count==nums.length/2)return true;
        else return false;
    }
}
